home *** CD-ROM | disk | FTP | other *** search
- Path: lantana.singnet.com.sg!usenet
- From: kim hai <Kim_Hai.Ng@msmail.st.stems.com>
- Newsgroups: comp.lang.c
- Subject: Help !!!!! on 'strstr"
- Date: Wed, 13 Mar 1996 09:21:03 -0800
- Organization: stems
- Message-ID: <314703FF.4045@msmail.st.stems.com>
- NNTP-Posting-Host: ts900-3207.singnet.com.sg
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Help !!!!!
-
- Problem :
- I need to locate a string within another string, and the process
- must be case insensitive. As far as I know, strstr() only locates the
- exact match and is case sensitive.
- Does anyone konw of any functions that could allow me to locate
- substrings and is case insensitive ?
-
- Eg.
- case 1:
- string1 = "abc"
- string2 = "abcdef"
- case 2:
- string2 = "Abcdef"
- case 3:
- string3 = "aBcdef"
- case 4:
- string4 = "abCdef"
- ...
- ..
- .
-
- Is taking care of all the combinations ( = 8) in string1 the only
- solution ? I'm working on Unix platform.
-
- Thankx
-
- <hai>
-